﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MyPublisher.Configuration
{
    public class MyPublisherConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("storageManager", IsDefaultCollection = false)]
        [ConfigurationCollection(typeof(StoragesConfiguration), AddItemName = "provider")]
        public StoragesConfiguration StorageManager
        {
            get
            {
                return (StoragesConfiguration)this["storageManager"];
            }
            set
            {
                this["storageManager"] = value;
            }
        }

        [ConfigurationProperty("connectionManager")]
        [ConfigurationCollection(typeof(ConnectionsConfiguration), AddItemName = "provider")]
        public ConnectionsConfiguration ConnectionManager
        {
            get
            {
                return (ConnectionsConfiguration)this["connectionManager"];
            }
            set
            {
                this["connectionManager"] = value;
            }
        }

        [ConfigurationProperty("transformManager")]
        [ConfigurationCollection(typeof(TransformsConfiguration), AddItemName = "provider")]
        public TransformsConfiguration TransformManager
        {
            get
            {
                return (TransformsConfiguration)this["transformManager"];
            }
            set
            {
                this["transformManager"] = value;
            }
        }


        [ConfigurationProperty("compositionManager")]
        [ConfigurationCollection(typeof(CompositionsConfiguration), AddItemName = "provider")]
        public CompositionsConfiguration CompositionManager
        {
            get
            {
                return (CompositionsConfiguration)this["compositionManager"];
            }
            set
            {
                this["compositionManager"] = value;
            }
        }
    }
}
